package com.ktjy.proxy;

import net.sf.cglib.proxy.Enhancer;
//生产代理对象
public class IntermediaryCglibProxyFactory {
    private static IntermediaryMethodInterceptor callback = new IntermediaryMethodInterceptor();

    public static Object create(Class target) {
        Enhancer enhancer = new Enhancer();
        enhancer.setSuperclass(target);
        enhancer.setCallback(callback);
        return enhancer.create();
    }
}
